package com.neusoft.neuiotms.dcvm.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "dcvm_alarm")
public class Alarm extends AbstractModel {
    private static final long serialVersionUID = 1L;

    /** 告警ID */
    @NotNull(message = "告警ID")
    @Column(length = 255, nullable = false, unique = true)
    private String alarmId;

    /** 告警设备 */
    @NotNull(message = "告警设备")
    @Column(length = 255, nullable = false)
    private String assetCode;

    /** 告警设备名 */
    @NotNull(message = "告警设备名")
    @Column(length = 255)
    private String assetName;

    /** 位置编码 */
    @NotNull(message = "位置编码 ")
    @Column(length = 255)
    private String locationCode;

    /** 位置名称 */
    @NotNull(message = "位置名称")
    @Column(length = 255)
    private String locationName;

    /** 机柜编码 */
    @NotNull(message = "机柜编码 ")
    @Column(length = 255, nullable = true)
    private String cabinetCode;

    /** 机柜名称 */
    @NotNull(message = "机柜名称")
    @Column(length = 255, nullable = true)
    private String cabinetName;

    /** 告警设备 */
    @NotNull(message = "告警等级")
    @Column(length = 255, nullable = false)
    private String alarmLevel;

    /** content */
    @NotNull(message = "消息内容")
    @Column(length = 2047, nullable = false)
    private String alarmContent;

    @NotNull(message = "告警时间")
    @Column(nullable = false)
    private Date alarmTime;

    /** 告警来源：2=IDC 综合运管平台告警 */
    @Column(nullable = true)
    private Integer sourceType;
}
